<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));

loadcss(array('colorbox'),P_CSS);
loadjs(array('jquery','jquery.colorbox'),P_JS);

loadjs(array('tab','util','table','ovalidator'));

?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","文章导出","",true,"n");
pt.createTab("t2","文章导入","",false,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    
});

function abc(f){
		$('#url').val(f);
}
$(document).ready(function(){ 
	$(".example1").colorbox({width:"400px", height:"400px", iframe:true, opacity:0.3});
});


</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />
<br />
<form action="<?php echo url('arc','dump_','type=1');?>" method="post" id="myform">
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="mytable">
  <tr>
    <td align="right"><span class="red">记录起始ID：</span></td>
    <td align="left">
        <input type="text" name="start" id="start" class="input" value="<?php echo $min_max[0];?>" /><span class="green">(大于等于1的正整数)</span>
    </td>
  </tr>
  <tr>
    <td align="right"><span class="red">记录结束ID：</span></td>
    <td align="left">
        <input type="text" name="stop" id="stop" class="input" value="<?php echo $min_max[1];?>" /><span class="green">(大于等于1的正整数)</span>
    </td>
  </tr>
  <tr>
    <td align="right">附上标题：</td>
    <td align="left"><?php echo form_radio('with_title',array(1=>'是',0=>'否'),1);?></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="提交" class="color_btn color_btn_green" /></td>
    </tr>
</table>
</form>
</div>
<div id="t2">
<br />
<br />
<form action="<?php echo url('arc','dump_','type=2');?>" method="post" id="myform">
<table width="90%" border="0" cellspacing="0" cellpadding="0" class="mytable">
  <tr>
    <td align="right"><span class="red">数据起始行：</span></td>
    <td align="left"><input type="text" name="myconfig[start_row]" class="input2" value="1" /><span class="green">(大于等于1的正整数)</span></td>
  </tr>
  <tr>
    <td align="right">包括ID列：</td>
    <td align="left">
    <?php echo form_radio('with_id',array(1=>'是',0=>'否'),1,'y_');?>
    </td>
  </tr>
  <tr>
    <td align="right">字段对应关系：</td>
    <td align="left">
    <div style="height:200px;overflow:scroll;">
    <?php
    foreach($fields as $k=>$v){
	?>
    (<?php echo $k+1;?>)"<?php echo $v;?>",<br />
    <?php
	}
	?>
    </div>
    </td>
  </tr>
  <tr>
    <td align="right"><span class="red">文件选择：</span></td>
    <td align="left"><input type="text" name="myconfig[url]" id="url" class="input" value="" /> [<a class="example1" href="<?php echo url('upload','add2','callback=abc');?>">上传</a>] <span class="green">(请上传后缀是xls的文件)</span></td>
  </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="提交" class="color_btn color_btn_green" /></td>
    </tr>
</table>
</form>
</div>

</body>
</html>